package com.kehao.netease;

import java.util.Scanner;

public class Q3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] charArray = sc.nextLine().toCharArray();
        if(charArray.length==0||charArray.length==1) {
            System.out.println(1);
            return;
        }
        int[] dp = new int[charArray.length];
        dp[0] = 1;
        if(charArray.length>=2){
            if(charArray[0]=='0'){
                dp[1] = 1;
            }else {
                dp[1] =2;
            }
        }
        for (int i = 2; i < charArray.length; i++) {
            dp[i] = dp[i-1];
            if(charArray[i-1]=='1'){
                dp[i]+=dp[i-2];
            }
            if(charArray[i-2]=='1'){
                if(i-3>=0){
                    dp[i]+=dp[i-3];
                }else {
                    dp[i]+=1;
                }
            }
        }
        System.out.println(dp[dp.length-1]);
    }
}
